<div class="panel panel-default">
  <div class="panel-heading">
    <h3 class="panel-title">{{ 'course.advanced.content_title'|trans }}</h3>
  </div>
  <div class="panel-body">
    {% for member in members if members %}
      {% set user = users[member.userId] %}
      <div class="media media-default">
        <div class="clearfix advanced">
          <div class="advanced-rank">
            {% if loop.index == 1 %}
              <img class="rank-img" src="{{ asset('assets/img/item-bank-exercise/medal_gold@2x.png') }}">
            {% elseif loop.index == 2%}
              <img class="rank-img" src="{{ asset('assets/img/item-bank-exercise/medal_silver@2x.png') }}">
            {% elseif loop.index == 3%}
              <img class="rank-img" src="{{ asset('assets/img/item-bank-exercise/medal_copper@2x.png') }}">
            {% else%}
              <div class="label-default rank-num">{{ loop.index }}</div>
            {% endif %}
          </div>
          <div class="advanced-avatar">
            <a class="{% if not user.destroyed|default(0) %}js-user-card{% endif %}" href="{{ path('user_show', {'id': user.id}) }}"
               data-card-url="{{ path('user_card_show', {'userId': user.id}) }}"
               data-user-id="{{ user.id }}"
               data-original-title="" title="">
              <img class="avatar-sm" src="{{ filepath(user.mediumAvatar, 'avatar.png') }}"></a>
          </div>
          <div class="advanced-nickname">
            {% if not user.destroyed|default(0) %}
              <a class="link-dark link-dark advanced-nickname-align" href="{{ path('user_show', {'id': user.id}) }}">{% if user.nickname|length > 5 %}{{ user.nickname|slice(0,4) ~ '...' }}{% else %}{{ user.nickname }}{% endif %}</a>
            {% else %}
              <a class="link-dark link-dark advanced-nickname-align">{{ 'user.user_had_destroyed'|trans }}</a>
            {% endif %}
          </div>
          {% if member.doneQuestionNum >= 10000 %}
            {% set question_num = member.doneQuestionNum/10000 ~ 'w' %}
          {% elseif member.doneQuestionNum < 10000 and member.doneQuestionNum >= 1000 %}
            {% set question_num = member.doneQuestionNum/1000 ~ 'k' %}
          {% else %}
            {% set question_num = member.doneQuestionNum %}
          {% endif %}
          <div class="pull-right advanced-info">
            <span class="advanced-info-num">{{ 'course.testpaper_manage.total_count'|trans }}</span>
            <span style="font-size: 16px;{% if loop.index < 4 %}color:#03C777;{% endif %}">{{ question_num }}</span>
          </div>
        </div>
      </div>
    {% else %}
      <div class="empty task-empty js-task-empty">
        {{'user.account.empty'|trans}}
      </div>
    {% endfor %}
  </div>
</div>

